#!/usr/bin/perl
use English;

open (FILE,"name.txt") or die "name.txt nicht vorhanden";
while ($a = <FILE>) {
        if ($a =~ m/((\w+)\s+)?(\w+)\s*:\s*(\d+)/) {
                print "Vorname:$2|\n";
                print "Name:$3\n";
                print "Zahl:$4\n";
        }
}
close (FILE);
